package com.flx.multi.thread.juc.locks;

import java.util.concurrent.locks.LockSupport;

/**
 * @Author Fenglixiong
 * @Create 2021/11/15 19:55
 * @Description
 **/
public class ParkTest {

    public static void main(String[] args) throws InterruptedException {

        Thread t1 = new Thread(()->{
            System.out.println("T1 start...");
            LockSupport.park();
            System.out.println("T1 end...");
        });
        t1.start();

        Thread.sleep(5000);

        LockSupport.unpark(t1);

    }

}
